#include <string>
#include <vector>
#include <fstream>
#include <iostream>

using namespace std;

int main(int argc, char const *argv[])
{
  ifstream ifs("demo.txt");
  vector<int> vec;

  while (!ifs.eof()) {
    string n;
    ifs >> n;
    cout << n << endl;
    
    vec.push_back(stoi(n));
  }

  for (int n : vec) {
    cout << n << " ";
  }
  cout << endl;
  return 0;
}
